package com.company;

public class ITDemo implements IMylnterface<String> {

    public int add(int a, int b){
        return a+b;
    }
    //声明一个泛型方法
    public <T extends Number>T addT(T a, T b){
        return a;
    }

    @Override
    public void show(String name){
        System.out.println(name);
    }

    public static void main(String[] args) {
        ITDemo itDemo = new ITDemo();
        Integer integer = itDemo.<Integer>addT(3,4); //泛型方法的应用
        System.out.println(integer);
        itDemo.show("A nice day!");
    }
}
